Pod::Spec.new do |mqttc|
	mqttc.name         = 'MQTTClient'
	mqttc.version      = '1.0.5'
	mqttc.summary      = 'iOS, macOS and tvOS native ObjectiveC MQTT Client Framework'
	mqttc.homepage     = 'https://gitee.com/huangqiu009/MQTTClient.git'
	mqttc.license      = { :type => 'EPLv1', :file => 'LICENSE' }
	mqttc.author       = { 'HuangQi' => '314019@163.com' }
    mqttc.source       = { :git => mqttc.homepage.to_s, :tag => mqttc.version.to_s }

	mqttc.requires_arc = true
	mqttc.platform = :ios, '6.1', :osx, '10.10', :tvos, '9.0'
	mqttc.ios.deployment_target = '6.1'
	mqttc.osx.deployment_target = '10.10'
	mqttc.tvos.deployment_target = '9.0'

	mqttc.subspec 'Min' do |min|
		min.source_files =	'MQTTClient/MQTTClient/MQTTCFSocketDecoder.{h,m}',
					'MQTTClient/MQTTClient/MQTTCFSocketEncoder.{h,m}',
					'MQTTClient/MQTTClient/MQTTCFSocketTransport.{h,m}',
					'MQTTClient/MQTTClient/MQTTCoreDataPersistence.{h,m}',
					'MQTTClient/MQTTClient/MQTTDecoder.{h,m}',
					'MQTTClient/MQTTClient/MQTTInMemoryPersistence.{h,m}',
					'MQTTClient/MQTTClient/MQTTLog.{h,m}',
					'MQTTClient/MQTTClient/MQTTStrict.{h,m}',
					'MQTTClient/MQTTClient/MQTTClient.h',
					'MQTTClient/MQTTClient/MQTTMessage.{h,m}',
					'MQTTClient/MQTTClient/MQTTPersistence.h',
					'MQTTClient/MQTTClient/MQTTSSLSecurityPolicy.{h,m}',
					'MQTTClient/MQTTClient/MQTTSSLSecurityPolicyDecoder.{h,m}',
					'MQTTClient/MQTTClient/MQTTSSLSecurityPolicyEncoder.{h,m}',
					'MQTTClient/MQTTClient/MQTTSSLSecurityPolicyTransport.{h,m}',
					'MQTTClient/MQTTClient/MQTTProperties.{h,m}',
					'MQTTClient/MQTTClient/MQTTSession.{h,m}',
					'MQTTClient/MQTTClient/MQTTSessionLegacy.{h,m}',
					'MQTTClient/MQTTClient/MQTTSessionSynchron.{h,m}',
					'MQTTClient/MQTTClient/MQTTTransport.{h,m}',
					'MQTTClient/MQTTClient/GCDTimer.{h,m}'
	end

	mqttc.subspec 'Manager' do |manager|
		manager.source_files =	'MQTTClient/MQTTClient/MQTTSessionManager.{h,m}',
					'MQTTClient/MQTTClient/ReconnectTimer.{h,m}',
					'MQTTClient/MQTTClient/ForegroundReconnection.{h,m}'
		manager.dependency 'MQTTClient/Min'
        manager.dependency 'MQTTClient/Websocket'
	end

	mqttc.subspec 'Websocket' do |ws|
		ws.source_files = 'MQTTClient/MQTTClient/MQTTWebsocketTransport/*.{h,m}'
		ws.dependency 'SocketRocket'
		ws.dependency 'MQTTClient/Min'
		ws.requires_arc = true
		ws.libraries = 'icucore'
	end
end
